
<div class="titlebar">
<div class="fn-left"><i class="iconfont icon-line-chart_icon"></i> 数据统计</div>
<div class="fn-right">
    <form class="input-group" id="form" action="{:url('user/worker',['types' => 0])}">
        <input placeholder="开始时间" class="input w100 ui-date" type="text" name="starttime" readonly autocomplete="false" value="{$starttime}"/>
        <input placeholder="结束时间" class="input w100 ui-date" type="text" name="endtime" readonly autocomplete="false" value="{$endtime}"/>
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
</div>
<div class="fn-right button-group">
    <a href="{:url('user/worker',['time' => 1,'types'=>0])}" class="button {$time==1?'button-violet':''}">今日</a>
    <a href="{:url('user/worker',['time' => 2,'types'=>0])}" class="button {$time==2?'button-violet':''}">昨日</a>
    <a href="{:url('user/worker',['time' => 30,'types'=>0])}" class="button {$time==30?'button-violet':''}"">本月</a>
    <a href="{:url('user/worker',['time' => 60,'types'=>0])}" class="button {$time==60?'button-violet':''}"">上月</a>
</div>
</div>
<div class="cards">
    <div class="card green">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$worker_num}</div><div class="text">合伙人数量</div></div>
    </div>
    <div class="card green">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$pass_num}</div><div class="text">待审核数量</div></div>
    </div>
    <div class="card green">
        <div class="fn-left"><i class="iconfont icon-my_icon"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$lock_num}</div><div class="text">锁定数量</div></div>
    </div>   <div class="card yellow">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$sum_price}</div><div class="text">总金额</div></div>
    </div>
</div>
<div class="titlebar"><i class="iconfont icon-text_icon"></i>合伙人列表</div>
<div id="actionbar">
    <div class="fn-left">
        <a href="javascript:;" url="{:url('user/selectWorker')}" class="button button-blue select"> <i class="iconfont icon-add_icon"></i>选择合伙人</a>
    </div>
    <div class="fn-right">
        <form id="form" action="{:url('user/worker')}" method="get">
            <input url="{:url('system/passport.user/selectUser')}" id="uid" placeholder="用户ID" class="input w100 selectID" type="text" name="uid" value="{$uid ? $uid:''}" />
            <input type="submit" value="搜索" class="button button-blue" />
        </form>
    </div>
    <div class="fn-right">
        <a href="{:url('user/worker',['types'=>0,'time'=>$time,'starttime' => $starttime,'endtime' => $endtime])}" class="button{if $types == 0} button-green{/if}">正常</a>
        <a href="{:url('user/worker',['types'=>1,'time'=>$time,'starttime' => $starttime,'endtime' => $endtime])}" class="button{if $types == 1} button-green{/if}">锁定</a>
        <a href="{:url('user/worker',['types'=>2,'time'=>$time,'starttime' => $starttime,'endtime' => $endtime])}" class="button{if $types == 2} button-green{/if}">待审核</a>
    </div>
</div>
<table class="table">
    <thead>
        <tr>
            <th class="w90 fn-tac">所属商家</th>
            <th class="w60 fn-tac"></th>
            <th>微信昵称</th>
            <th class="w100 fn-tac">手机号</th>
            <th class="w160 fn-tac">登录IP</th>
            <th class="w160 fn-tac">申请类型</th>
            <th class="w70 fn-tac">订单状态</th>
            <th class="w140 fn-tac">开通时间</th>
            <th class="w140 fn-tac">登录时间</th>
            <th class="w140 fn-tac">创建时间</th>
            <th class="w70 fn-tac">状态</th>
            <th class="w90 fn-tac">删除</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $vo}
        <tr>
            <td class="fn-tac button-group">
                <a class="button" href="{:url('user/workerStore',['id'=>$vo.id])}"><i class="iconfont icon-store_icon"></i>商家</a>
            </td>
            <td class="fn-tac"><img src="{$vo.user.face}" class="w40" /></td>
            <td><a href="javascript:openwin('{:url('user/review',['uid' => $vo.user.id])}')">{$vo.user.nickname}</a></td>
            <td class="fn-tac">{$vo.user.phone_uid}</td>
            <td class="fn-tac">{$vo.user.login_ip}</td>
            <td class="fn-tac">{if $vo.is_type}公众号申请{else/}后台添加{/if}</td>
            <td class="fn-tac">{if $vo.pay_state == 1}已支付{elseif $vo.pay_state == 2/}免费{else /}未支付{/if}</td>
            <td class="fn-tac">{$vo.create_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac">{$vo.user.login_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac">{$vo.user.create_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac li">
                <a class="istop" url="{:url('user/ispass',['id'=>$vo.id])}" href="javascript:;" title="已通过/未审核">{if $vo.is_pass}<span class="badge bg-green">已通过</span>{else/}<span class="badge">未审核</span>{/if}</a><br />
                <a class="istop" url="{:url('user/islock',['id'=>$vo.id])}" href="javascript:;" title="已锁定/未锁定">{if $vo.is_lock}<span class="badge bg-red">已锁定</span>{else/}<span class="badge">未锁定</span>{/if}</a>
            </td>
            <td class="fn-tac">
                <a class="button isDel" url="{:url('user/workerDelete',['id'=>$vo.id])}" href="javascript:;" title="删除"><i class="iconfont icon-lajixiang"></i>删除</a>            
            </td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$list|raw}
<script type="text/javascript">
Do('base','form','layer','tip','date', function () {
    $('#form').isForm({types:1});
    $('.isDel').isDel();
    $(".select").win({reload:1});
    $(".selectID").win();
    $('.istop').click(function () {
        var url = $(this).attr("url");
        parent.layer.confirm('确认要设置当前用户?',{ icon: 3,title: '友情提示' }, function (index) {
            $.getJSON(url, function (data) {window.location.reload();});
            parent.layer.close(index);
        });
    })
})
</script>